/**
 * 
 */
package com.xinnet.mms.enums;


/**
 * 交易状态枚举
 * @author 王志军
 * @author $Author:$
 * @version $Revision:$ $Date:$ 
 * @since 2016-1-13
 * 
 */
public enum ConsumeStateEnmu {
	
	TRACK(1,"跟踪"),
	SUCCESS(2,"成功"),
	FAIL(3,"失败");
	
	private Integer value;
	
	private String label;
	
	private ConsumeStateEnmu(Integer value, String label){
		this.value = value;
		this.label = label;
	}
	
	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}
	
	
	/**
	 * 根据value获取对应的枚举
	 * @param value
	 * @return
	 */
	public static ConsumeStateEnmu getAllotTypeEnmuByValue(Integer value){
		ConsumeStateEnmu[] custEnums = ConsumeStateEnmu.values();
		for (ConsumeStateEnmu custEnum : custEnums) {
			if(custEnum.getValue().equals(value)){
				return custEnum;
			}
		}
		return null;
	}
}
